package cn.edu.fzu.delivery.io;

import lombok.Data;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;

import java.util.Collections;
import java.util.List;

/**
 * @author fangxin
 * @date 2022/11/10
 */
@Data
public class DingDingAt {

    private List<String> atMobiles;

    private List<String> atUserIds;

    private boolean      isAtAll;

    public DingDingAt(List<String> atMobiles, String userId) {
        this.atMobiles = atMobiles;
        this.atUserIds = Collections.singletonList(userId);
        this.isAtAll = CollectionUtils.isEmpty(atMobiles) && StringUtils.isBlank(userId);
    }

}
